<!doctype html>
<title>Reference for floated legend should not disappear</title>
<style>
  div { width: 100px; height: 100px; background: lime; }
</style>
<p>There should be no red.</p>
<div></div>
